package parkingshare

import (
	"fmt"

	"github.com/go-redis/redis"
)

type RedisOpt struct {
	client *redis.Client
}

func (c *RedisOpt) ExampleNewClient() {
	c.client = redis.NewClient(
		&redis.Options{
			Addr:     "118.190.44.187:6379",
			Password: "123456", // no password set
			DB:       1,        // use default DB
		})

	pong, err := c.client.Ping().Result()
	fmt.Println(pong, err)

}

func (c *RedisOpt) set(key, value string) {
	err := c.client.Set(key, value, 0).Err()
	if err != nil {
		fmt.Println(err)
	}

}

/*
  1 设置列表
*/
func (c *RedisOpt) setList() {

}
